﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EntitiesContext;

namespace EntitiesContext.MyEntities
{
    public class MyGroup
    {
        #region Public Properties
        public int GroupId { get; set; }
        public string Name { get; set; }
        public string GroupPrefearedLan { get; set; }
        #endregion

        public override string ToString()
        {
            return Name;
        }

        public static implicit operator Group(MyGroup g)
        {
            EntitiesContext.Group newGroup = new EntitiesContext.Group();
            newGroup.GroupId = g.GroupId;
            newGroup.GroupPrefearedLan = g.GroupPrefearedLan;
            newGroup.Name = g.Name;

            return newGroup;
        }
    }
}
